# -*- coding: utf-8 -*-
"""
# @Time    : 2021/1/9 下午4:19
# @Author  : tgy
"""
import sys
import os
import time

def test01():
    ...
    # 1. 时间戳
    print(time.time())
    # 2. 格式化时间
    print(time.strftime("%Y-%m-%d %X", time.gmtime()))
    # 3. 结构化时间
    print(time.localtime())
    print(time.gmtime())

    # 4. 时间戳转结构化时间
    print(time.gmtime(121))
    # 5. 结构化时间转时间戳
    print(time.mktime(time.localtime()))

    str_time = time.strptime("2014-01-12 12:11:10", '%Y-%m-%d %X')
    print(time.mktime(str_time))

    # time.sleep(3)
    print('111')
    print(os.environ.get('name'))

if __name__ == '__main__':
    ...
    test01()